<template>
	<view :style="item.compStyle" :class="item.compClass">
		<titleBettweenAndContent 
		:config="getTitleConfig"
		@click="click(getTitleConfig, 'title')">
			<view slot="content">
				<view class="bot-content">
					<view class="list-item pre-hover" hover-class="hover" v-for="(item, index) in getList" :key="index" @tap.stop="click(item, 'list')">
						<image src="" mode="aspectFill" class="product-img"></image>
						<view class="bot-box">
							<text class="product-name">这是一条标题这是一条标题这是一条标题这是一条标题这是一条标题</text>
							<view class="flex_row_e_none">
								<text class="product-name-2nd">已领1000件</text>
							</view>
							<view class="flex_row_c_c">
								<view class="flex_row_c_c" style="height: 50rpx;width:160rpx;background-color: #F52F50;color: #ffffff;font-size: 28rpx;border-radius: 100px;">
									免费领券
								</view>
							</view>
						</view>
					</view>
					<view style="width: 200rpx; height: 0;"></view>
				</view>
			</view>
		</titleBettweenAndContent>
	</view>
</template>

<script>
	import titleBettweenAndContent from '../titleBettweenAndContent/titleBettweenAndContent.vue';
	import QSSuperComponentCustomCompMixin from '../QSSuperComponentCustomCompMixin.js'
	export default {
		mixins: [QSSuperComponentCustomCompMixin({componentType:'bargainBuy-1'})],
		mixins: [ myCompMixin({ componentType: 'mode-6' }) ],
		components: { titleBettweenAndContent },
		props: {
			item: {
				type: Object,
				default: ()=>({})
			}
		},
		computed: {
			getTitleConfig() {
				const o = this.item?.titleConfig || {};
				
				return { fontSize: '38rpx' , ...o};
			},
			getList() {
				return this.item?.list || [];
			}
		}
	}
</script>

<style scoped>
	.top-image{
		display: block;
		width: 100%;
		height: 200rpx;
		background-color: #F2F2F2;
	}
	.bot-content{
		padding: 0 25rpx 0;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	
	.list-item{
		border: 1px solid #F2F2F2;
		display: flex;
		flex-direction: column;
		width: 200rpx;
		margin-bottom: 25rpx;
	}
	
	.product-img{
		width: 200rpx;
		height: 200rpx;
		background-color: #B7E9FF;
		/* margin-bottom: 20rpx; */
		border-radius: 8rpx 8rpx 0 0;
	}
	.product-name{
		width: 100%;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		display: -webkit-box;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: 28rpx;
		margin-bottom: 22rpx;
	}
	
	.bot-box{
		padding: 20rpx 16rpx 27rpx;
	}
	
	.price{
		font-size: 32rpx;
		color: #F52F50;
	}
	.through-price {
		font-size: 24rpx;
		color: #BBBBBB;
		text-decoration: line-through;
	}
	.product-name-2nd{
		font-size: 24rpx;
		color: #BBBBBB;
		margin-bottom: 20rpx;
	}
</style>
